package com.module.app.base.loadsir;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import com.module.app.R;

/**
 * Author: yanxuwen
 * Date: 2023/5/17
 * Desc:
 */
public class MyAppCallback {

    /**
     * 设置弹窗样式
     */
    public static void setLoadingPopup(View view) {
        try {
            View loading = view.findViewById(R.id.loading);
            ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) loading.getLayoutParams();
            lp.bottomMargin = 0;
            loading.setLayoutParams(lp);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * 设置弹窗样式
     */
    public static void setEmptyPopup(View view) {
        try {
            View layout_logo = view.findViewById(R.id.layout_logo);
            ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) layout_logo.getLayoutParams();
            lp.bottomMargin = 0;
            layout_logo.setLayoutParams(lp);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
